package com.jicheng.mapper;

import com.jicheng.dto.integrity.FamilyMainMemberDto;
import com.jicheng.entity.FamilyMainMember;
import com.jicheng.framework.mybatis.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FamilyMainMemberMapper extends BaseMapper<FamilyMainMember> {

    List<FamilyMainMemberDto> getFamilyMainMember(@Param("reportId") String reportId, @Param("cadreId") String cadreId, @Param("appId") String appId);
    @Select("select count(1) from family_main_member where id = #{cadreId}")
    int isExist(String cadreId);

    @Delete("delete from family_main_member where id = #{id}")
    void del(@Param("id") String id);
}